package lab02.test18;

public class Test18 {
    public static void main(String[] args) {
        String name ="My name is Network crazy";

        System.out.println(name.length());
        System.out.println(name.charAt(name.length()-1));
        System.out.println(name.charAt(0));
        //API
        //分割,用空格分割单词并存储在字符串数组中。
        String[] result = name.split(" ");
        System.out.println(result[0]);
        //打印字符串crazy的位置（从0开始编号的位置
        System.out.println(name.indexOf("crazy"));
    }
}
